home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / Finder.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  5.8 KB  |  197 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Finder.p
  3.  
  4.      Contains:    Finder flags and container types.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1990-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Finder;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __FINDER__}
  28. {$SETC __FINDER__ := 1}
  29.  
  30. {$I+}
  31. {$SETC FinderIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __DIALOGS__}
  38. {$I Dialogs.p}
  39. {$ENDC}
  40.  
  41.  
  42. {$PUSH}
  43. {$ALIGN MAC68K}
  44. {$LibExport+}
  45.  
  46.  
  47. CONST
  48.     kCustomIconResource            = -16455;                        {  Custom icon family resource ID  }
  49.  
  50.     kContainerFolderAliasType    = 'fdrp';                        {  type for folder aliases  }
  51.     kContainerTrashAliasType    = 'trsh';                        {  type for trash folder aliases  }
  52.     kContainerHardDiskAliasType    = 'hdsk';                        {  type for hard disk aliases  }
  53.     kContainerFloppyAliasType    = 'flpy';                        {  type for floppy aliases  }
  54.     kContainerServerAliasType    = 'srvr';                        {  type for server aliases  }
  55.     kApplicationAliasType        = 'adrp';                        {  type for application aliases  }
  56.     kContainerAliasType            = 'drop';                        {  type for all other containers  }
  57.                                                                 {  types for Special folder aliases  }
  58.     kSystemFolderAliasType        = 'fasy';
  59.     kAppleMenuFolderAliasType    = 'faam';
  60.     kStartupFolderAliasType        = 'fast';
  61.     kPrintMonitorDocsFolderAliasType = 'fapn';
  62.     kPreferencesFolderAliasType    = 'fapf';
  63.     kControlPanelFolderAliasType = 'fact';
  64.     kExtensionFolderAliasType    = 'faex';                        {  types for AppleShare folder aliases  }
  65.     kExportedFolderAliasType    = 'faet';
  66.     kDropFolderAliasType        = 'fadr';
  67.     kSharedFolderAliasType        = 'fash';
  68.     kMountedFolderAliasType        = 'famn';
  69.  
  70.                                                                 {  Finder Flags  }
  71.     kIsOnDesk                    = $0001;
  72.     kColor                        = $000E;
  73.     kIsShared                    = $0040;                        {  bit 0x0080 is hasNoINITS  }
  74.     kHasBeenInited                = $0100;                        {  bit 0x0200 was the letter bit for AOCE, but is now reserved for future use  }
  75.     kHasCustomIcon                = $0400;
  76.     kIsStationery                = $0800;
  77.     kNameLocked                    = $1000;
  78.     kHasBundle                    = $2000;
  79.     kIsInvisible                = $4000;
  80.     kIsAlias                    = $8000;
  81.  
  82. {$IFC OLDROUTINENAMES }
  83.     kIsStationary                = $0800;
  84.  
  85. {$ENDC}  {OLDROUTINENAMES}
  86.  
  87. {    
  88.     The following declerations used to be in Files.≈, 
  89.     but are Finder specific and were moved here.
  90. }
  91.                                                                 {  Finder Constants  }
  92.     fOnDesk                        = 1;
  93.     fHasBundle                    = 8192;
  94.     fTrash                        = -3;
  95.     fDesktop                    = -2;
  96.     fDisk                        = 0;
  97.  
  98.  
  99. TYPE
  100.     FInfoPtr = ^FInfo;
  101.     FInfo = RECORD
  102.         fdType:                    OSType;                                    { the type of the file }
  103.         fdCreator:                OSType;                                    { file's creator }
  104.         fdFlags:                INTEGER;                                { flags ex. hasbundle,invisible,locked, etc. }
  105.         fdLocation:                Point;                                    { file's location in folder }
  106.         fdFldr:                    INTEGER;                                { folder containing file }
  107.     END;
  108.  
  109.     FXInfoPtr = ^FXInfo;
  110.     FXInfo = RECORD
  111.         fdIconID:                INTEGER;                                { Icon ID }
  112.         fdUnused:                ARRAY [0..2] OF INTEGER;                { unused but reserved 6 bytes }
  113.         fdScript:                SInt8;                                    { Script flag and number }
  114.         fdXFlags:                SInt8;                                    { More flag bits }
  115.         fdComment:                INTEGER;                                { Comment ID }
  116.         fdPutAway:                LONGINT;                                { Home Dir ID }
  117.     END;
  118.  
  119.     DInfoPtr = ^DInfo;
  120.     DInfo = RECORD
  121.         frRect:                    Rect;                                    { folder rect }
  122.         frFlags:                INTEGER;                                { Flags }
  123.         frLocation:                Point;                                    { folder location }
  124.         frView:                    INTEGER;                                { folder view }
  125.     END;
  126.  
  127.     DXInfoPtr = ^DXInfo;
  128.     DXInfo = RECORD
  129.         frScroll:                Point;                                    { scroll position }
  130.         frOpenChain:            LONGINT;                                { DirID chain of open folders }
  131.         frScript:                SInt8;                                    { Script flag and number }
  132.         frXFlags:                SInt8;                                    { More flag bits }
  133.         frComment:                INTEGER;                                { comment }
  134.         frPutAway:                LONGINT;                                { DirID }
  135.     END;
  136.  
  137.  
  138. { Values of the 'message' parameter to a Control Panel 'cdev' }
  139.  
  140. CONST
  141.     initDev                        = 0;                            { Time for cdev to initialize itself }
  142.     hitDev                        = 1;                            { Hit on one of my items }
  143.     closeDev                    = 2;                            { Close yourself }
  144.     nulDev                        = 3;                            { Null event }
  145.     updateDev                    = 4;                            { Update event }
  146.     activDev                    = 5;                            { Activate event }
  147.     deactivDev                    = 6;                            { Deactivate event }
  148.     keyEvtDev                    = 7;                            { Key down/auto key }
  149.     macDev                        = 8;                            { Decide whether or not to show up }
  150.     undoDev                        = 9;
  151.     cutDev                        = 10;
  152.     copyDev                        = 11;
  153.     pasteDev                    = 12;
  154.     clearDev                    = 13;
  155.     cursorDev                    = 14;
  156.  
  157.  
  158. { Special values a Control Panel 'cdev' can return }
  159.     cdevGenErr                    = -1;                            { General error; gray cdev w/o alert }
  160.     cdevMemErr                    = 0;                            { Memory shortfall; alert user please }
  161.     cdevResErr                    = 1;                            { Couldn't get a needed resource; alert }
  162.     cdevUnset                    = 3;                            {  cdevValue is initialized to this }
  163.  
  164. { Control Panel Default Proc }
  165.  
  166. TYPE
  167.     ControlPanelDefProcPtr = ProcPtr;  { FUNCTION ControlPanelDef(message: INTEGER; item: INTEGER; numItems: INTEGER; cPanelID: INTEGER; VAR theEvent: EventRecord; cdevValue: LONGINT; cpDialog: DialogPtr): LONGINT; }
  168.  
  169.     ControlPanelDefUPP = UniversalProcPtr;
  170.  
  171. CONST
  172.     uppControlPanelDefProcInfo = $000FEAB0;
  173.  
  174. FUNCTION NewControlPanelDefProc(userRoutine: ControlPanelDefProcPtr): ControlPanelDefUPP;
  175.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  176.     INLINE $2E9F;
  177.     {$ENDC}
  178.  
  179. FUNCTION CallControlPanelDefProc(message: INTEGER; item: INTEGER; numItems: INTEGER; cPanelID: INTEGER; VAR theEvent: EventRecord; cdevValue: LONGINT; cpDialog: DialogPtr; userRoutine: ControlPanelDefUPP): LONGINT;
  180.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  181.     INLINE $205F, $4E90;
  182.     {$ENDC}
  183.  
  184.  
  185.  
  186.  
  187. {$ALIGN RESET}
  188. {$POP}
  189.  
  190. {$SETC UsingIncludes := FinderIncludes}
  191.  
  192. {$ENDC} {__FINDER__}
  193.  
  194. {$IFC NOT UsingIncludes}
  195.  END.
  196. {$ENDC}
  197.